Skip to content

Add SurrealDB driver as a backend#585

Open
itsezc wants to merge 9 commits intok3s-io:masterfrom
itsezc:surrealdb
Open

Add SurrealDB driver as a backend#585
itsezc wants to merge 9 commits intok3s-io:masterfrom
itsezc:surrealdb

Conversation

@itsezc
Copy link

@itsezc itsezc commented Jan 11, 2026

Implements SurrealDB driver for a backend / storage including a sample guide on /examples/

Closes #277

@itsezc itsezc requested a review from a team as a code owner January 11, 2026 07:18
@brandond
Copy link
Member

brandond commented Jan 16, 2026

Thanks for the contribution! In order for us to accept this, we need passing tests showing that it works. Please add tests - you can look at https://github.com/k3s-io/kine/blob/master/scripts/test-run-mysql as an example of a test setup script, and add the new backend to the list here:

test: [sqlite, mysql, postgres, cockroachdb, schema-migration, nats, nats-embedded, nats-socket]

@brandond
Copy link
Member

@itsezc are you still working on this?

@itsezc
Copy link
Author

itsezc commented Feb 5, 2026

@itsezc are you still working on this?

Yes, I plan on making the recommended changes in the coming days. @brandond I've made necessary changes for DCO, Github PR workflows and added test-run-surrealdb which runs successfully.

Let me know if you need any further changes, thank you.

hifi and others added 8 commits February 6, 2026 04:57
To support using Litestream for backing up the database, the following
additional options have been added:

 - DS flag `_kine_disable_compact_wal_checkpoint` to disable automatic
   full checkpoint after compact
 - DS flag `_kine_disable_wal_autocheckpoint` to disable automatic
   passive checkpoints done by SQLite
 - New database driver `litestream` that will combine the flags above
   and in addition enable persisting WAL after closing the database

When using the `litestream` driver it is absolutely required to have
Litestream running as otherwise the WAL file will grow indefinitely.

Signed-off-by: Toni Spets <toni.spets@beeper.com>
Signed-off-by: Chiru B <33750251+itsezc@users.noreply.github.com>
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.3 to 1.9.4.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](sirupsen/logrus@v1.9.3...v1.9.4)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-version: 1.9.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Chiru B <33750251+itsezc@users.noreply.github.com>
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.18.2 to 1.18.3.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](klauspost/compress@v1.18.2...v1.18.3)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.18.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Chiru B <33750251+itsezc@users.noreply.github.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Chiru B <33750251+itsezc@users.noreply.github.com>
Fix issue where lists would return the requested revision as latest in
the RangeResponse header, instead of the actual latest revision.

This behavior goes back to the very first commit to this project, but
does not match what etcd does.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Chiru B <33750251+itsezc@users.noreply.github.com>
Signed-off-by: Chiru B <33750251+itsezc@users.noreply.github.com>
Signed-off-by: Chiru B <+itsezc@users.noreply.github.com>
Signed-off-by: Chiru B <chiru@foretag.co>
Signed-off-by: Chiru B <33750251+itsezc@users.noreply.github.com>
Signed-off-by: Chiru B <33750251+itsezc@users.noreply.github.com>
@brandond
Copy link
Member

brandond commented Feb 5, 2026

You're going to need to clean this up a bit - I'd probably squash it, or rebase it on top of master. Merging master into your branch is almost never what you want.

You also need to --sign-off your commits for DCO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for SurrealDB

3 participants